<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>VBS Test</title>

<!-- Autoload External Scripts -->
<script type="text/vbscript">
' Set Files to Include Here
dim aINCLUDE(1)
aINCLUDE(1) = "test.object.vbs"

' *** FILE INCLUDE HANDLER
' include file
Function kwIncludeFile(sFilePath)
	On Error Resume Next
	dim oFsoInc, oFileHandler, sIncContent
	Set oFsoInc = CreateObject ("Scripting.FileSystemObject")
	
	If sFilePath = "" Then: Exit Function: End If
	
	If NOT oFsoInc.FileExists(sFilePath) Then
		kwTriggerError("unable to load " & sFilePath & " : file not found")
		Exit Function
	End If
	
	Set oFileHandler = oFsoInc.OpenTextFile(sFilePath,1)
	If Err.number <> 0 Then
		kwTriggerError("file " & sFilePath & " could not be opened")
		Exit Function
	End If
	
 	sIncContent = oFileHandler.ReadAll
 	oFileHandler.close
 	ExecuteGlobal sIncContent

	Set oFsoInc = Nothing
	Set oFileHandler = Nothing

End Function

' include all files
Sub kwIncludeFiles
	dim sFile
	For Each sFile In aINCLUDE
		kwIncludeFile(sFile)
	Next
End Sub

Call kwIncludeFiles
</script>


</head>

<body>

<h1>Visual Basic Script Testing</h1>

<div id="output">

<script type="text/vbscript">
Document.Write("<h2>dictionary object test</h2><div>sOutput found in test.object.vbs</div>")
Document.Write("<pre>" & sOutput & "</pre>")
</script>

</div>

</body>
</html>
